#include <stdio.h>
int main()
{
	int n;
	int count = 0;
	scanf_s("%d", &n);
	for (int i = 0; i < 32; i++)
	{
		if ((n >> 1) & 1 == 1)
			count++;
	}
	printf("%d", count);
	return 0;
}